home *** CD-ROM | disk | FTP | other *** search
/ The Canadian & World Encyclopedia 1998 / The Canadian & World Encyclopedia 1998 - Disc 2.iso / mac / prime_CD / pb / PROFILE.DIR / 01015_Script_qtrepeat < prev    next >
Text File  |  1997-07-29  |  7KB  |  291 lines

  1. global qtrep_return
  2. on qtrepeat sp, startt, spshow
  3.   --  put "start at" && startt & " : the movierate is " & the movierate of sprite sp
  4.   
  5.   cursor 0
  6.   repeat while the movierate of sprite sp = 1
  7.     if the mousedown then 
  8.       bail sp
  9.       exit repeat
  10.     end if
  11.     set x = the movietime of sprite sp
  12.     --    put x
  13.     if x > startt then
  14.       --      puppettransition trans, transt, chunk
  15.       go the frame + 1
  16.       --      set the visible of sprite spshow = true
  17.       exit repeat
  18.     end if
  19.     
  20.     go the frame
  21.   end repeat
  22. end 
  23.  
  24. on qtrepeatnew sp, startt, spshow, sphide,spritelist, tomark
  25.   --  put "start at" && startt & " : the movierate is " & the movierate of sprite sp
  26.   
  27.   cursor 0
  28.   repeat while the movierate of sprite sp = 1
  29.     
  30.     --    repeat with x in [24,34,35]
  31.     --      
  32.     --      if rollover(x) then 
  33.     --        handcursor
  34.     --        repeat while the movierate of sprite sp = 1
  35.     --          if the mousedown then 
  36.     --            
  37.     --            if rollover(34) then 
  38.     --              bail sp
  39.     --              doisstext(tomark)
  40.     --            end if
  41.     --            
  42.     --            if rollover(24) then 
  43.     --              bail sp
  44.     --              trackbutton(24, cast "close down")  
  45.     --              leave_iss
  46.     --              abort
  47.     --            end if
  48.     --            
  49.     --            if rollover(33) then 
  50.     --              
  51.     --              see_sprite([30,31,32],false)
  52.     --              bail sp
  53.     --              abort
  54.     --            end if
  55.     --          end if
  56.     --          
  57.     --          if rollover(x) then 
  58.     --            updatestage
  59.     --          else 
  60.     --            cursor 0
  61.     --            exit repeat
  62.     --          end if
  63.     --        end repeat
  64.     --        
  65.     --        exit repeat
  66.     --        
  67.     --      end if
  68.     --      
  69.     --      updatestage
  70.     --    end repeat
  71.     
  72.     if the mousedown then 
  73.       case true of
  74.         (rollover(34)) : pass
  75.         (rollover(24)) : pass
  76.         otherwise
  77.           
  78.           bail sp
  79.           cursor 0
  80.           see_sprite(spritelist,true)
  81.           abort
  82.       end case
  83.       
  84.     end if
  85.     
  86.     set x = the movietime of sprite sp
  87.     if x > startt then
  88.       
  89.       if sphide < 49 then set the visible of sprite sphide = false
  90.       set the visible of sprite spshow = true
  91.       updatestage
  92.       exit repeat
  93.     end if
  94.     
  95.     updatestage
  96.   end repeat
  97. end 
  98.  
  99.  
  100. on doslideshow tomark, spritelist, qttimes, qtsprite
  101.   see_sprite(spritelist,false)
  102.   
  103.   go to frame marker(tomark)
  104.   
  105.   set lastsp = 0
  106.   set the movietime of sprite qtsprite = 0
  107.   set the movierate of sprite qtsprite = 1
  108.   
  109.   repeat while the movierate of sprite qtsprite = 0
  110.     if the mousedown then 
  111.       see_sprite(spritelist,true)
  112.       abort
  113.     end if
  114.   end repeat
  115.   
  116.   repeat with cue in qttimes
  117.     --    put "waiting for: " & cue
  118.     set pos = getpos(qttimes,cue)
  119.     
  120.     if lastsp <> 0 then
  121.       set lastsp = getat(spritelist,pos - 1)
  122.       --      put "last sprite: "& lastsp & "/ current: "&getat(spritelist,pos)
  123.     else
  124.       set lastsp = 49               -- more than the number of channels
  125.     end if
  126.     qtrepeatnew qtsprite,cue,getat(spritelist,pos),lastsp,spritelist, tomark
  127.   end repeat
  128.   
  129. end
  130.  
  131.  
  132. on playnew sp, cnum
  133.   qtstop sp
  134.   switchqt sp, cnum
  135.   set the visible of sprite sp = true
  136.   set the volume of sprite sp = 255
  137.   
  138.   qtstart sp
  139.   
  140.   global can_play
  141.   put FALSE into item 3 of can_play
  142.   
  143.   --  put "playing"&& the name of cast cnum&": "  &the movierate of sprite sp && "can_play: " & item 3 of can_play
  144.   
  145.  
  146. end
  147.  
  148. on switchqt sp, cnum
  149.   puppetsprite sp, true
  150.   set oldd to the itemdelimiter
  151.   set the itemdelimiter to "_"
  152.   set id to item 2 of the name of cast cnum of castlib "shared"
  153.   set mtype to item 1 of the name of cast cnum of castlib "shared"
  154.   global gsep,mp
  155.   
  156.   set fname to id&".mov"
  157.   case true of
  158.     (mtype contains "vid"): set mdir to "moovs"
  159.     (mtype contains "snd"): set mdir to "snd"
  160.   end case
  161.   set p to mp&mdir&gsep&fname
  162.   set m to mtype&"_"&id
  163.   set the filename of member 1 of castlib "shared" to p
  164.   
  165.   set the itemdelimiter to oldd
  166. --  preloadmember member 1 of castlib "shared"
  167.   
  168. end 
  169.  
  170.  
  171. on qtstop sp
  172.   set the movierate of sprite sp = 0
  173. end
  174.  
  175.  
  176. on qtstart sp
  177.   set the movietime of sprite sp = 0
  178.   set the movierate of sprite sp = 1
  179. end
  180.  
  181. on xqtwait sp
  182.   repeat while the movierate of sprite sp = 1
  183.     
  184.     repeat with x in [24,34,35,36]
  185.       if rollover(x) then 
  186.         handcursor
  187.         exit repeat
  188.       end if
  189.     end repeat
  190.     
  191.     if the mousedown then 
  192.       abort
  193.     end if
  194.     updatestage
  195.   end repeat
  196. end
  197.  
  198. on doisstext tomark
  199.   
  200.   put "tra_"&item 1 of tomark&item 2 of tomark into iss_text
  201.   put the text of field iss_text into field "issue text"
  202.   
  203.   see_sprite([37,38,39,40,41],true)
  204.   global issue_text
  205.   set issue_text = FALSE
  206.   abort
  207. end
  208.  
  209. on qt_waitxx sp, tomark
  210.   repeat while the movierate of sprite sp = 1
  211.     cursor 0
  212.     if the mousedown then pass
  213.     if the mouseup then pass
  214.     updatestage
  215.     go the frame
  216.   end repeat
  217. end qt_wait
  218.  
  219. on qt_wait sp, tomark
  220.   repeat while the movierate of sprite sp = 1
  221.     
  222.     cursor 0
  223.     repeat with x in [24,34,35,36]
  224.       
  225.       if rollover(x) then 
  226.         handcursor
  227.         repeat while the movierate of sprite sp = 1
  228.           if the mouseup then pass
  229.           
  230.           if the mousedown then
  231.             case true of
  232.               (rollover(34)) :
  233.                 doisstext(tomark)
  234.                 bail sp
  235.               (rollover(24)) : pass
  236.             end case
  237.           end if
  238.           
  239.           pass
  240.           if rollover(x) then 
  241.             updatestage
  242.           else 
  243.             cursor 0
  244.             exit repeat
  245.           end if
  246.         end repeat
  247.         
  248.         exit repeat
  249.         
  250.       end if
  251.       
  252.       updatestage
  253.     end repeat
  254.     
  255.     if the mousedown then 
  256.       bail sp
  257.       exit
  258.     end if
  259.     updatestage
  260.   end repeat
  261. end
  262.  
  263. on bail sp
  264.   cursor 4
  265.   -- puppettransition 02
  266.   global iss_vid
  267.   set iss_vid = 0
  268.   
  269.   if the castnum of sprite sp <> 0 then
  270.     --    put the casttype of cast (the castnum of sprite sp)
  271.     if the casttype of cast (the castnum of sprite sp) = #digitalvideo then
  272.       set the movierate of sprite sp = 0
  273.       set the movietime of sprite sp = 0
  274.     end if
  275.   end if
  276.   
  277.   repeat with x in [35,43]
  278.     if rollover(x) then 
  279.       
  280.       exit repeat
  281.     end if
  282.   end repeat
  283.   set_puppets([35,43],false)
  284.   
  285.   puppettransition 51,01,16
  286.   go to qtrep_return
  287.   
  288.   set_cursors([9,11,12,17,18,19,24,30,31,32,34,35])
  289.   cursor -1
  290.   updatestage
  291. end